var roleModel = {
	getinfo: function(data, result, fail){
		$.ajax({
			url: '/admin/role/info',
			data: data,
			type: 'GET',
			success: function (data) {
				result(data);
			},
			error: function (data) { 
				fail(data);
			}
		});
	},
	update: function(data, result, fail){
		var url = '/admin/role/update';
		$.post(url, data, result).fail(fail);
	},
	delete: function(data, result, fail){
		var url = '/admin/role/delete';
		$.post(url, data, result).fail(fail);
	},
	getUsers: function(data, result, fail){
		var url = '/admin/role/users-list';
		$.get(url, data, result).fail(fail);
	},
	addUser: function(data, result, fail){
		var url = '/admin/role/user-add';
		$.post(url, data, result).fail(fail);
	},
	removeUser: function(data, result, fail){
		var url = '/admin/role/remove-user';
		$.post(url, data, result).fail(fail);
	},
	addPerm: function(data, result, fail){
		var url = '/admin/role/perm-add';
		$.post(url, data, result).fail(fail);
	},
	removePerm: function(data, result, fail){
		var url = '/admin/role/remove-perm';
		$.post(url, data, result).fail(fail);
	}
};